package space.sakana.edusysback.entity.paper;

import space.sakana.edusysback.entity.question.Question;

public class PaperItem {

    private int id;
    private int pid;
    private int index;
    private int qid;
    private int score;

    private String title;
    private int sid;
    private int type;

    public PaperItem(int id, int pid, int index, int qid, int score) {
        this.id = id;
        this.pid = pid;
        this.index = index;
        this.qid = qid;
        this.score = score;
    }

    public PaperItem(int pid, int index, int qid, int score) {
        this.pid = pid;
        this.index = index;
        this.qid = qid;
        this.score = score;
    }

    public void filePaperItem(Question question){
        if (question==null){
            this.title = "题目不存在!";
            this.type = -1;
            this.sid = -1;
            return;
        }
        this.title = question.getTitle();
        this.sid = question.getSid();
        this.type = question.getType();
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getQid() {
        return qid;
    }

    public void setQid(int qid) {
        this.qid = qid;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
